package cn.xmy.demo01.dao;


import cn.xmy.demo01.pojo.ShopInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;
@Mapper
public interface ShopInfoDao {
    //查询
    List<ShopInfo> findAllShops() throws SQLException, ClassNotFoundException;
    //删除
    int deleteShopInfo(String id)throws SQLException, ClassNotFoundException;
    // 根据商品 ID 获取商品价格
    double getPriceById(@Param("id") String id);
    // 更新商品的数量和总价
    int updateShopQuantity(@Param("id") String id, @Param("number") int number, @Param("result") double result);

}
